home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / binarydb / frmmain.frm (.txt) < prev    next >
Visual Basic Form  |  1997-02-19  |  3KB  |  110 lines

  1. VERSION 4.00
  2. Begin VB.Form frmMain 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Binary DB Demo"
  5.    ClientHeight    =   2550
  6.    ClientLeft      =   1155
  7.    ClientTop       =   3525
  8.    ClientWidth     =   8580
  9.    Height          =   2955
  10.    Icon            =   "frmMain.frx":0000
  11.    Left            =   1095
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   2550
  16.    ScaleWidth      =   8580
  17.    ShowInTaskbar   =   0   'False
  18.    Top             =   3180
  19.    Width           =   8700
  20.    Begin VB.CommandButton Command3 
  21.       Caption         =   "&Delete Record"
  22.       Height          =   375
  23.       Left            =   1440
  24.       TabIndex        =   2
  25.       Top             =   2070
  26.       Width           =   1275
  27.    End
  28.    Begin VB.CommandButton Command1 
  29.       Caption         =   "&Add Record..."
  30.       Height          =   375
  31.       Left            =   90
  32.       TabIndex        =   1
  33.       Top             =   2070
  34.       Width           =   1275
  35.    End
  36.    Begin VB.ListBox List1 
  37.       BackColor       =   &H00FFFFFF&
  38.       BeginProperty Font 
  39.          name            =   "Fixedsys"
  40.          charset         =   0
  41.          weight          =   400
  42.          size            =   9
  43.          underline       =   0   'False
  44.          italic          =   0   'False
  45.          strikethrough   =   0   'False
  46.       EndProperty
  47.       Height          =   1860
  48.       ItemData        =   "frmMain.frx":0442
  49.       Left            =   90
  50.       List            =   "frmMain.frx":0444
  51.       TabIndex        =   0
  52.       Top             =   90
  53.       Width           =   8385
  54.    End
  55.    Begin VB.Label Label2 
  56.       BackStyle       =   0  'Transparent
  57.       Caption         =   "Doubleclick to edit."
  58.       Height          =   375
  59.       Left            =   3780
  60.       TabIndex        =   4
  61.       Top             =   2070
  62.       Width           =   2265
  63.    End
  64.    Begin VB.Label Label1 
  65.       BackStyle       =   0  'Transparent
  66.       Caption         =   "Note: NT 4.0 Users Won't See Horizontal Scroll Bar."
  67.       Height          =   375
  68.       Left            =   6210
  69.       TabIndex        =   3
  70.       Top             =   2070
  71.       Width           =   2265
  72.    End
  73. Attribute VB_Name = "frmMain"
  74. Attribute VB_Creatable = False
  75. Attribute VB_Exposed = False
  76. Private Sub Command1_Click()
  77. On Error Resume Next
  78.     BinaryMgmt.AddRecord
  79. On Error GoTo 0
  80. On Error Resume Next
  81. End Sub
  82. Private Sub Command3_Click()
  83. On Error Resume Next
  84.     BinaryMgmt.DeleteRecord
  85. On Error GoTo 0
  86. On Error Resume Next
  87. End Sub
  88. Private Sub Form_Load()
  89. On Error Resume Next
  90.     BinaryMgmt.ReadAllRecords
  91.     Reply = SendMessage(Me.List1.hwnd, &H400 + 21, 1000, 0&)
  92.     Any_Change_At_All = False
  93. On Error GoTo 0
  94. On Error Resume Next
  95. End Sub
  96. Private Sub Form_Unload(Cancel As Integer)
  97. On Error Resume Next
  98.     If Any_Change_At_All = True Then
  99.         BinaryMgmt.CompactDatabase
  100.     End If
  101. On Error GoTo 0
  102. On Error Resume Next
  103. End Sub
  104. Private Sub List1_DblClick()
  105. On Error Resume Next
  106.     BinaryMgmt.EditRecord
  107. On Error GoTo 0
  108. On Error Resume Next
  109. End Sub
  110.